Fix a potential wild pointer error when markSlotSuccessful comes late Bug: 178637306 Bug: 169436297 Test: make boot control's IsSlotMarkedSuccessful always return false, launch update_engine Change-Id: I12c01c5f062ec4b41718f2cada817f6557eb2b0e Merged-In: I12c01c5f062ec4b41718f2cada817f6557eb2b0e 
diff --git a/cleanup_previous_update_action.cc b/cleanup_previous_update_action.cc index 88dbc57..9f84c3b 100644 --- a/cleanup_previous_update_action.cc +++ b/cleanup_previous_update_action.cc 
@@ -153,6 +153,7 @@  if (!kIsRecovery &&  !boot_control_->IsSlotMarkedSuccessful(boot_control_->GetCurrentSlot())) {  ScheduleWaitMarkBootSuccessful(); + return;  }    if (metadata_device_ == nullptr) {